<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>


<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>

<%@ include file="/WEB-INF/aconfirm.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>创建文章</title>
	<script type="text/javascript">
  		function getEditorHTMLContents(EditorName) {
		    var oEditor = FCKeditorAPI.GetInstance(EditorName);
		    return(oEditor.GetXHTML(true));
		}
		function $(id)
		{
			return document.getElementById(id);
		}
		function doPost()
		{
			var title = $('title').value;
			var tag = $('tag').value;
			var content = getEditorHTMLContents('editor');
			
		}
	</script>
  </head>
  
  <body>
    	<form>
    		<table>
    			<tr>
    				<td>
    					文章标题:
    				</td>
    				<td>
    					<input type="text" name="title" id="title" />
    				</td>
    			</tr>
    			<tr>
    				<td>
    					标签:
    				</td>
    				<td>
    					<input type="text" name="tag" id="tag" />
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
						<FCK:editor width="590" height="430" instanceName="editor" toolbarSet="Basic" basePath="/common/fckeditor">
							<jsp:attribute name="value">&nbsp;
							</jsp:attribute>
							<jsp:body>
								<FCK:config CustomConfigurationsPath="${pageContext.request.contextPath}/common/fckeditor/fckconfig.js" />
							</jsp:body>
						</FCK:editor>    					
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="button" value="发布文章" onclick="javascript:doPost();" />
    				</td>
    			</tr>
    		</table>
    	</form>
  </body>
</html:html>
